/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import javax.persistence.Entity;
import net.sf.oval.constraint.Email;
import net.sf.oval.constraint.MaxSize;
import play.data.validation.Phone;
import play.data.validation.Required;
import play.data.validation.URL;
import play.db.jpa.Model;

/**
 *
 * @author Jarjarbing
 */

@Entity
public class Company extends Model{
    
    @Required
    @MaxSize(10)
    public String CompanyID;
    
    @Required
    @MaxSize(50)
    public String Name;
    
    @MaxSize(10)
    public String Address;
    
    @MaxSize(10)
    public String District;
    
    @MaxSize(10)
    public String Province;
    
    @MaxSize(10)
    public String Zipcode;
    
    @MaxSize(30)
    public String Country;
    
    @Phone
    @MaxSize(30)
    public String Telephone;
    
    @Phone
    @MaxSize(30)
    public String Fax;
    
    @URL
    public String WebSite;
    
    @Email
    public String EmailAddress;
    
    public String TaxID;
    
    public Company(String CompanyID, String Name, String District, String Province, String Zipcode, String Country, String Telephone, String Fax, String WebSite, String EmailAddress, String TaxID) {
        this.CompanyID = CompanyID;
        this.Name = Name;
        this.District = District;
        this.Province = Province;
        this.Zipcode = Zipcode;
        this.Country = Country;
        this.Telephone = Telephone;
        this.Fax = Fax;
        this.WebSite = WebSite;
        this.EmailAddress = EmailAddress;
        this.TaxID = TaxID;
    }
}
